import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function verifyToken() {
  return request({
    url: '/user/verifyToken',
    method: 'get',
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}

export function findAll(data) {
  return request({
    url: '/user/list',
    method: 'post',
    data
  })


}

  //删除
export function deleted(id) {
  return request.get("/user/delete/"+id);
}
//修改
export function updates(data) {
  return request.post("/user/update",data);
}

//通过Id查询